package com.lesama.inner;

/*
* 局部内部类：
* 定义在方法体、代码块、构造器中的内部类，比较鸡肋
* */

public class LocalInner {
    public static void main(String[] args) {
        A a = new A();
        a.method();
    }
}

class A {
    public void method() {
        System.out.println("A method");
        class B {
            int num = 10;
            public void print() {
                System.out.println("B print");
            }
        }
        B b = new B();
        b.print();
        System.out.println(b.num);
    }
}
